﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:local="clr-namespace:CBR.Components.Controls"
					>

	<Style x:Key="{x:Type local:ProcessPanel}" TargetType="{x:Type local:ProcessPanel}">
		<Setter Property="Visibility" Value="Visible" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type local:ProcessPanel}">
					<DockPanel x:Name="PART_Container" VerticalAlignment="Bottom" Panel.ZIndex="1000">
						<DockPanel.Resources>
							<Storyboard x:Name="PART_CloseStoryboard" x:Key="PART_CloseStoryboard">
								<DoubleAnimation x:Name="CloseAnim"
									Storyboard.TargetName="PART_Container"
									Storyboard.TargetProperty="(Height)"
									From="41"
									To="0"
									Duration="00:00:00.4000000" />
							</Storyboard>

							<Storyboard x:Name="PART_OpenStoryboard" x:Key="PART_OpenStoryboard">
								<DoubleAnimation x:Name="OpenAnim"
									Storyboard.TargetName="PART_Container"
									Storyboard.TargetProperty="(Height)"
									From="0"
									To="41"
									Duration="00:00:00.4000000" />
							</Storyboard>
						</DockPanel.Resources>
						<Grid Margin="0">
							<Border x:Name="top" Grid.ColumnSpan="4" CornerRadius="7,7,0,0">
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFFF00C7"/>
										<GradientStop Color="#FF4E3A4A" Offset="1"/>
										<GradientStop Color="#FF91317C" Offset="0.064"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
						</Grid>
					</DockPanel>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsControl.ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<Grid Margin="0" Height="35">
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="150" SharedSizeGroup="Title" />
							<ColumnDefinition Width="2*" />
							<ColumnDefinition Width="35" />
							<ColumnDefinition Width="35" />
						</Grid.ColumnDefinitions>

						<TextBlock Grid.Column="0" VerticalAlignment="Center" Margin="5" Background="Transparent"
						   Text="{Binding Title}" TextWrapping="WrapWithOverflow" TextTrimming="WordEllipsis" />
						<TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="5" Background="Transparent"
						   Text="{Binding Message}" TextWrapping="WrapWithOverflow" TextTrimming="WordEllipsis" />
						<local:WaitSpin Grid.Column="2" AutoPlay="True" Margin="6"></local:WaitSpin>
						<Button Grid.Column="3" Margin="6" Content="x" Command="{Binding CancelCommand}" />
					</Grid>
				</DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>